<template>
  <h1>父组件</h1>
  <h2>父组件身上的钱</h2>
  <Son :money="money" @change-money="fn" />
</template>

<script>
import Son from './components/Son.vue';
import { ref } from 'vue';
export default {
  components: {
    Son,
  },
  setup() {
    const money = ref(8000000);

    const fn = (val) => {
      money.value = val;
    };

    return { money, fn };
  },
};
</script>
